1. Field of the Invention
The present invention relates to a storage control device, a data recovery device, and a storage system.
2. Description of the Related Art
Recently, a Not AND (NAND) flash memory has been widely used as one of recording media. The NAND flash memory is a nonvolatile memory capable of holding information even if power supply is suspended.
In such a NAND flash memory, as the memory has a larger capacity and is more highly integrated, an effect of degradation of written data with age or read disturb, which is a data corruption associated with or a read process, becomes noticeable. Accordingly, there is a problem in that a possibility that the stored data cannot be reproduced correctly increases due to degradation of the stored data. The degradation with age is a phenomenon such that an error occurs in the data because electric charges gradually come off from a floating gate, which accumulates therein the electric charges, with a lapse of time. The read disturb is a phenomenon such that an error occurs in the data because electric charges are slightly accumulated at the floating gate of a memory cell adjacent to a memory cell, from which the data is read.
To solve the above problems of the degradation with age and the read disturb, in the NAND flash memory, correct data can be recovered by using an error correcting code for correcting an error occurred in the data.
In addition, in the NAND flash memory, by performing a refresh process of rewriting the data in the NAND flash memory after performing error correction, the data stored in the NAND flash memory can be prevented from being completely corrupted, thereby enabling to extend a data retention period.
Recently, a NAND flash memory having the same connection interface standard (ATA standard) as that of a hard disk drive (HDD) has been developed, which is referred to as a solid state drive (SSD). Such an SSD is excellent in data read performance as compared with the HDD, and has a feature of low consumption power and shock resistance.
A method in which data is once deleted in a unit referred to as a block and then written, a method in which data is read or written in a unit referred to as a page, and a method in which the unit of deletion, reading, and writing is fixed can be mentioned as methods for storing data in the NAND flash memory.
On the other hand, a unit of data reading and writing performed by a host device such as a server computer, a controller in a storage system, or a personal computer, with respect to a secondary memory represented by a HDD is referred to as a sector. The sector is set independently of the unit of deletion, reading, and writing of a semiconductor memory device such as the NAND flash memory. For example, the dimension of the sector (sector size) of the host device is set as 512 bytes, whereas the dimension of the block (block size) of the semiconductor memory device is 512 Kilobytes, and the dimension of the page (page size) is 4 Kilobytes.
That is, when the secondary memory is formed of the SSD instead of the HDD, a data requested to write from the host device of a sector size smaller than the block size or the page size of the SSD needs to be adapted to the block size or the page size of the SSD and written in the SSD. Such a process is referred to as a padding process (for example, see “The Design and Implementation of the 4.4BSD Operating System: Marshall Kirk McKusick et. al., supervised translations by Hideki Sunahara, translated by Naohiro Shichijo, p. 233, 6.2 Block Device”).
An outline of data write by the padding process is explained below.    (1) A data requested to write for data of a size (sector size) smaller than the block size or the page size of the SSD is transmitted from the host device to the secondary memory formed of the SSD.    (2) A data requested to write is stored in a work area in the secondary memory formed of the SSD, and data of an unchanged part excluding an updated part corresponding to the data requested to write in a write destination area is read as padding data, which is stored in the work area together with the data requested to write.    (3) After a deletion process is performed with respect to the write destination area, the data in the work area (the data requested to write and the padding data) is written into the write destination area.
In the above padding process, however, while reading the data of the unchanged part excluding the updated part corresponding to the data requested to write in the write destination area as the padding data, and if error correction by the error correcting code fails and a data read error occurs because the data is degraded with age or read disturb and so on, it is determined that the write process cannot be continued, even if there is no problem in the data requested to write and the SSD itself.